<%--
  Created by IntelliJ IDEA.
  User: asus
  Date: 2023/5/5
  Time: 17:11
  To change this template use File | Settings | File Templates.
--%>
<%--员工性别与部门名称的默认选择未做--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Update</title>
<%--    <script src="js/vue.js"></script>--%>
<%--    <script src="js/axios.js"></script>--%>
</head>
<body>
<div id="app">
    <form action="${pageContext.request.contextPath}/employee">
        员工姓名: <input type="text" name="ename" value="<%=request.getParameter("ename")%>"><br>
        员工性别:
        <input type="radio" name="egendar" value="1" id="man" ><label for="man">男</label>
        <input type="radio" name="egendar" value="0" id="woman" checked><label for="woman">女</label><br>
        部门名称:
        <select id="choose-dep" name="depid">
            <option value="1">总经理办公室</option>
            <option value="2" aria-checked="true">人力资源部</option>
            <option value="3">财务部</option>
            <option value="4">生产技术部</option>
            <option value="5">计划营销部</option>
            <option value="6">安全监察部</option>
            <option value="7">后勤部</option>
        </select>
        <input type="text" name="act" value="update" style="display: none">
        <input type="text" name="empid" value="12" style="display: none">
<%--        <input type="text" name="empid" value="<%=request.getParameter("empid")%>" style="display: none">--%>
<%--        <input type="text" id="getsex" value="<%=request.getParameter("egendar")%>" style="display: none">--%>
        <button>提交</button><button type="reset">重置</button>
    </form>
    <button onclick="window.location.href='${pageContext.request.contextPath}/home.jsp'">返回主界面</button>
</div>
</body>
<script>
    const flag = '<%=request.getParameter("flag")%>';
    if(flag=="false"){
        alert("修改信息失败!");
    }
</script>
</html>
